Skip to content

fix: updated GCP validation to always consider 403 response as valid result#383

Merged
cx-diogo-rocha merged 4 commits intomasterfrom
AST-147054-fix-inconsistent-validity-gcp-api-key
Apr 17, 2026
Merged

fix: updated GCP validation to always consider 403 response as valid result#383
cx-diogo-rocha merged 4 commits intomasterfrom
AST-147054-fix-inconsistent-validity-gcp-api-key

Conversation

@cx-diogo-rocha
Copy link
Copy Markdown
Contributor

Closes #

Proposed Changes

We had an issue where GCP API Keys were having inconsistent validation, varying from Valid to Unknown depending on the response body.

After testing the API, we concluded that 403-Forbidden code is only received if the token is valid. It might, however, not be valid to the API we are testing (Youtube API). But it is still valid as a GCP API Key.

Therefore we are treating all 403 codes as Valid, unless an error occurred on parsing the response body (this error behavior was already present)

Checklist

  • I covered my changes with tests.
  • I Updated the documentation that is affected by my changes:
    • Change in the CLI arguments
    • Change in the configuration file

I submit this contribution under the Apache-2.0 license.

@cx-diogo-rocha cx-diogo-rocha requested a review from a team as a code owner April 16, 2026 13:32
@github-actions
Copy link
Copy Markdown

kics-logo

KICS version: v1.7.13

Category Results
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 0
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 0
Metric Values
Files scanned placeholder 16
Files parsed placeholder 16
Files failed to scan placeholder 0
Total executed queries placeholder 53
Queries failed to execute placeholder 0
Execution time placeholder 1

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

Logo
Checkmarx One – Scan Summary & Details4bc088a8-2c5d-4713-a696-195ba7edf0f3

Great job! No new security vulnerabilities introduced in this pull request

@cx-diogo-rocha cx-diogo-rocha merged commit 3e59cdb into master Apr 17, 2026
12 checks passed
@cx-diogo-rocha cx-diogo-rocha deleted the AST-147054-fix-inconsistent-validity-gcp-api-key branch April 17, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants